$nsForm .
'</td>
<td class="mw-allpages-nav">' .
- $this->getSkin()->link( $this->getTitle(), wfMsgHtml ( 'allpages' ),
+ Linker::link( $this->getTitle(), wfMsgHtml ( 'allpages' ),
array(), array(), 'known' ) .
"</td>
</tr>" .
* @param $to String: list all pages to this name (default FALSE)
*/
function showChunk( $namespace = NS_MAIN, $from = false, $to = false ) {
- global $wgContLang, $wgLang;
+ global $wgContLang;
$output = $this->getOutput();
- $sk = $this->getSkin();
$fromList = $this->getNamespaceKeyAndText($namespace, $from);
$toList = $this->getNamespaceKeyAndText( $namespace, $to );
$t = Title::newFromRow( $s );
if( $t ) {
$link = ( $s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) .
- $sk->link( $t ) .
+ Linker::link( $t ) .
($s->page_is_redirect ? '</div>' : '' );
} else {
$link = '[[' . htmlspecialchars( $s->page_title ) . ']]';
$nsForm .
'</td>
<td class="mw-allpages-nav">' .
- $sk->link( $self, wfMsgHtml ( 'allpages' ) );
+ Linker::link( $self, wfMsgHtml ( 'allpages' ) );
# Do we put a previous link ?
if( isset( $prevTitle ) && $pt = $prevTitle->getText() ) {
if( $namespace )
$query['namespace'] = $namespace;
- $prevLink = $sk->linkKnown(
+ $prevLink = Linker::linkKnown(
$self,
wfMessage( 'prevpage', $pt )->escaped(),
array(),
$query
);
- $out2 = $wgLang->pipeList( array( $out2, $prevLink ) );
+ $out2 = $this->getLang()->pipeList( array( $out2, $prevLink ) );
}
if( $n == $this->maxPerPage && $s = $res->fetchObject() ) {
if( $namespace )
$query['namespace'] = $namespace;
- $nextLink = $sk->linkKnown(
+ $nextLink = Linker::linkKnown(
$self,
wfMessage( 'nextpage', $t->getText() )->escaped(),
array(),
$query
);
- $out2 = $wgLang->pipeList( array( $out2, $nextLink ) );
+ $out2 = $this->getLang()->pipeList( array( $out2, $nextLink ) );
}
$out2 .= "</td></tr></table>";
}
$output->addHTML(
Html::element( 'hr' ) .
Html::rawElement( 'div', array( 'class' => 'mw-allpages-nav' ),
- $wgLang->pipeList( $links )
+ $this->getLang()->pipeList( $links )
) );
}
* @param $par String: becomes "FOO" when called like Special:Prefixindex/FOO (default null)
*/
function execute( $par ) {
- global $wgRequest, $wgOut, $wgContLang;
+ global $wgContLang;
$this->setHeaders();
$this->outputHeader();
- $wgOut->addModuleStyles( 'mediawiki.special' );
+
+ $out = $this->getOutput();
+ $out->addModuleStyles( 'mediawiki.special' );
# GET values
- $from = $wgRequest->getVal( 'from', '' );
- $prefix = $wgRequest->getVal( 'prefix', '' );
- $ns = $wgRequest->getIntOrNull( 'namespace' );
+ $request = $this->getRequest();
+ $from = $request->getVal( 'from', '' );
+ $prefix = $request->getVal( 'prefix', '' );
+ $ns = $request->getIntOrNull( 'namespace' );
$namespace = (int)$ns; // if no namespace given, use 0 (NS_MAIN).
$namespaces = $wgContLang->getNamespaces();
- $wgOut->setPagetitle(
+ $out->setPagetitle(
( $namespace > 0 && in_array( $namespace, array_keys( $namespaces ) ) )
? wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) )
: wfMsg( 'prefixindex' )
if ( $this->including() || $showme != '' || $ns !== null ) {
$this->showPrefixChunk( $namespace, $showme, $from );
} else {
- $wgOut->addHTML( $this->namespacePrefixForm( $namespace, null ) );
+ $out->addHTML( $this->namespacePrefixForm( $namespace, null ) );
}
}
*/
function namespacePrefixForm( $namespace = NS_MAIN, $from = '' ) {
global $wgScript;
- $t = $this->getTitle();
$out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
$out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
- $out .= Html::hidden( 'title', $t->getPrefixedText() );
+ $out .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() );
$out .= Xml::openElement( 'fieldset' );
$out .= Xml::element( 'legend', null, wfMsg( 'allpages' ) );
$out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
* @param $from String: list all pages from this name (default FALSE)
*/
function showPrefixChunk( $namespace = NS_MAIN, $prefix, $from = null ) {
- global $wgOut, $wgContLang, $wgLang;
-
- $sk = $this->getSkin();
+ global $wgContLang;
- if (!isset($from)) $from = $prefix;
+ if ( $from === null ) {
+ $from = $prefix;
+ }
$fromList = $this->getNamespaceKeyAndText($namespace, $from);
$prefixList = $this->getNamespaceKeyAndText($namespace, $prefix);
$t = Title::makeTitle( $s->page_namespace, $s->page_title );
if( $t ) {
$link = ($s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) .
- $sk->linkKnown(
+ Linker::linkKnown(
$t,
htmlspecialchars( $t->getText() )
) .
$query['namespace'] = $namespace;
}
- $out2 = $wgLang->pipeList( array(
+ $out2 = $this->getLang()->pipeList( array(
$out2,
- $sk->linkKnown(
+ Linker::linkKnown(
$self,
wfMsgHtml( 'nextpage', str_replace( '_',' ', htmlspecialchars( $s->page_title ) ) ),
array(),
Xml::closeElement( 'table' );
}
- $wgOut->addHTML( $out2 . $out );
+ $this->getOutput()->addHTML( $out2 . $out );
}
}